<admintpl file="header"/></head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('afterloan/report')}">贷后操作统计</a></li>
        <li class="active"><a>{$admins[$principal]} 个人贷后操作统计</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('afterloan/report_user_detail',['principal'=>$principal])}" style='line-height: 46px;'>
        <input type="text" name="mobile" placeholder="请输入手机号" value="{:I('request.mobile')}" />
        <input type="text" name="name" placeholder="请输入姓名" value="{:I('request.name')}" />
        <input type="text" name="operation_date_start" placeholder="开始日期" value="{:I('request.operation_date_start')}" class="js-date" /> -
        <input type="text" name="operation_date_end" placeholder="结束日期" value="{:I('request.operation_date_end')}" class="js-date" />

        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:U('afterloan/report_user_detail',['principal'=>$principal])}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <php>$model = new \User\Model\ReportCurrentOrders();</php>
        <table class="table table-hover table-bordered" id='tab_check'>
            <thead>
            <tr>
                <th>订单号</th>
                <th>登记日期</th>
                <th>登记人</th>
                <th>用户</th>
                <th>手机</th>
                <th>收款登记金额</th>
                <th>平台</th>
                <th>是否解套</th>
                <th>解套平台</th>
                <th>解套金额</th>
                <th>是否续期</th>
                <th>续期金额</th>
                <th>用户状态</th>
                <th>核对人</th>
                <th>核对时间</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$orders[$vo['oid']]}</td>
                    <td>{$vo.operation_date}</td>
                    <td>{$admins[$vo['principal']]}</td>
                    <td>{$users[$vo['user_id']]['name']}</td>
                    <td>{$users[$vo['user_id']]['mobile']}</td>
                    <td style="padding: 0;border-top: 0;">
                        <ul class="list-group" style="border: 0;padding: 0;margin: 0;">
                            <li class="list-group-item">
                                <span class="badge">{$vo.total_system_amount}</span>
                                系统
                            </li>
                            <li class="list-group-item">
                                <span class="badge">{$vo.total_wechat_amount}</span>
                                <span style="color:green">微信({$admins[$vo['wechat_rev_admin_id']]})</span>
                            </li>
                            <li class="list-group-item">
                                <span class="badge">{$vo.total_alipay_amount}</span>
                                <span style="color:blue">支付宝({$admins[$vo['alipay_rev_admin_id']]})</span>
                            </li>
                            <li class="list-group-item">
                                <span class="badge">{$vo.total_bank_amount}</span>
                                <span style="color:#ff8216">银行转账(上官志勇)</span>
                            </li>
                            <li class="list-group-item">
                                <span class="badge">{$vo.total_rev_amount}</span>
                                <span style="color:darkred">小计：</span>
                            </li>
                        </ul>
                    </td>
                    <td>
                        <php>echo \User\Model\LoanOperationLogModel::getPlatformText($vo['platform']);</php>
                    </td>
                    <td>
                        <php>echo \User\Model\LoanOperationLogModel::getIsReliefText($vo['is_relief']);</php>
                    </td>
                    <td>{$vo.relief_platform_txt}</td>
                    <td>{$vo.relief_amount}</td>
                    <td>
                        <php>echo \User\Model\LoanOperationLogModel::getIsRenewalText($vo['is_renewal']);</php>
                    </td>
                    <td>
                        {$vo['renewal_amount']}
                    </td>
                    <td>
                        <php>echo \User\Model\LoanOperationLogModel::getUserStatusText($vo['user_status']);</php>
                    </td>
                    <td>{$admins[$vo['check_admin_id']]}</td>
                    <td>{$vo.check_time}</td>
                </tr>
            </foreach>
            </tbody>
            <tfoot>
            <tr>
                <td>合计：</td>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
                <td>{$total.sum_rev_amount}</td>
                <td></td>
                <td></td>
                <td></td>
                <td>{$total.total_relief_amount}</td>
                <td></td>
                <td>{$total.total_renewal_amount}</td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            </tfoot>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body></html>